package com.meepo.sdk.component.observerimport io.reactivex.Observerimport io.reactivex.annotations.NonNullimport io.reactivex.annotations.Nullableimport io.reactivex.disposables.Disposable/** * @author * * @date  2020/11/2 2:37 PM * @version 1.0 */abstract class Observer<T> : Observer<T> {    /**     * 根据具体的Api 业务逻辑去重写 onSuccess 方法     * @param t     */    abstract fun onSuccess(t: T?)    abstract fun onFailure(e: Throwable)    open fun onFinal() {}    override fun onSubscribe(@Nullable d: Disposable) {}    override fun onNext(@Nullable t: T) {        onSuccess(t)        onFinal()    }    override fun onError(@NonNull e: Throwable) {        //  onNext called with null. Null values are generally not allowed in 2.x operators and sources.        if (e is NullRspError) {            onSuccess(null)        } else {            onFailure(e)        }        onFinal()    }    override fun onComplete() {}}